package com.ddone.controller;

import com.ddone.service.UserService;
import com.ddone.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author ddone
 * @date 2024/3/25-17:13
 */
@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;


    @GetMapping
    public Result all(){
        return Result.ok(userService.findAll());
    }

}
